/*
 * Indiana University Community Grid Computing Lab Software License,Version 1.1
 *
 * Copyright (c) 2002 Community Grid Computing Lab, Indiana University. 
 * All rights reserved.		
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *      "This product includes software developed by the Indiana University 
 *       Community Grid Computing Lab (http://www.communitygrids.iu.edu/)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Indiana Univeristy","Indiana Univeristy Pervasive Techonology
 *    Labs" and  "Indiana Univeristy Community Grid Computing Lab" must not be
 *    used to endorse or promote products derived from this software without 
 *    prior written permission. For written permission, please contact 
 *    http://www.communitygrids.iu.edu/.
 *
 * 5. Products derived from this software may not use "Indiana
 *    University" name nor may "Indiana University" appear in their name,
 *    without prior written permission of the Indiana University.
 *
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 
 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 
 * INDIANA UNIVERSITY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
/**
 * FilterServiceLocator.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.2beta3 Aug 01, 2004 (05:59:22 PDT) WSDL2Java emitter.
 */

package cgl.sensorgrid.sopac.gps.filters.ws.stubs;

public class FilterServiceLocator extends org.apache.axis.client.Service implements
        cgl.sensorgrid.sopac.gps.filters.ws.stubs.FilterService {

    // Use to get a proxy class for Filter
    private java.lang.String Filter_address =
            "http://localhost:8080/sensorgrid-services/services/Filter";

    public java.lang.String getFilterAddress() {
        return Filter_address;
    }

    // The WSDD service name defaults to the port name.
    private java.lang.String FilterWSDDServiceName = "Filter";

    public java.lang.String getFilterWSDDServiceName() {
        return FilterWSDDServiceName;
    }

    public void setFilterWSDDServiceName(java.lang.String name) {
        FilterWSDDServiceName = name;
    }

    public cgl.sensorgrid.sopac.gps.filters.ws.stubs.Filter getFilter() throws
            javax.xml.rpc.ServiceException {
        java.net.URL endpoint;
        try {
            endpoint = new java.net.URL(Filter_address);
        } catch (java.net.MalformedURLException e) {
            throw new javax.xml.rpc.ServiceException(e);
        }
        return getFilter(endpoint);
    }

    public cgl.sensorgrid.sopac.gps.filters.ws.stubs.Filter getFilter(java.net.
            URL portAddress) throws javax.xml.rpc.ServiceException {
        try {
            cgl.sensorgrid.sopac.gps.filters.ws.stubs.FilterSoapBindingStub
                    _stub = new cgl.sensorgrid.sopac.gps.filters.ws.stubs.
                            FilterSoapBindingStub(portAddress, this);
            _stub.setPortName(getFilterWSDDServiceName());
            return _stub;
        } catch (org.apache.axis.AxisFault e) {
            return null;
        }
    }

    public void setFilterEndpointAddress(java.lang.String address) {
        Filter_address = address;
    }

    /**
     * For the given interface, get the stub implementation.
     * If this service has no port for the given interface,
     * then ServiceException is thrown.
     */
    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.
            xml.rpc.ServiceException {
        try {
            if (cgl.sensorgrid.sopac.gps.filters.ws.stubs.Filter.class.
                isAssignableFrom(serviceEndpointInterface)) {
                cgl.sensorgrid.sopac.gps.filters.ws.stubs.FilterSoapBindingStub
                        _stub = new cgl.sensorgrid.sopac.gps.filters.ws.stubs.
                                FilterSoapBindingStub(new java.net.URL(
                        Filter_address), this);
                _stub.setPortName(getFilterWSDDServiceName());
                return _stub;
            }
        } catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException(
                "There is no stub implementation for the interface:  " +
                (serviceEndpointInterface == null ? "null" :
                 serviceEndpointInterface.getName()));
    }

    /**
     * For the given interface, get the stub implementation.
     * If this service has no port for the given interface,
     * then ServiceException is thrown.
     */
    public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
                                   Class serviceEndpointInterface) throws javax.
            xml.rpc.ServiceException {
        if (portName == null) {
            return getPort(serviceEndpointInterface);
        }
        java.lang.String inputPortName = portName.getLocalPart();
        if ("Filter".equals(inputPortName)) {
            return getFilter();
        } else {
            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
            return _stub;
        }
    }

    public javax.xml.namespace.QName getServiceName() {
        return new javax.xml.namespace.QName(
                "http://filters.gps.sopac.sensorgrid.cgl", "FilterService");
    }

    private java.util.HashSet ports = null;

    public java.util.Iterator getPorts() {
        if (ports == null) {
            ports = new java.util.HashSet();
            ports.add(new javax.xml.namespace.QName(
                    "http://filters.gps.sopac.sensorgrid.cgl", "Filter"));
        }
        return ports.iterator();
    }

    /**
     * Set the endpoint address for the specified port name.
     */
    public void setEndpointAddress(java.lang.String portName,
                                   java.lang.String address) throws javax.xml.
            rpc.ServiceException {
        if ("Filter".equals(portName)) {
            setFilterEndpointAddress(address);
        } else { // Unknown Port Name
            throw new javax.xml.rpc.ServiceException(
                    " Cannot set Endpoint Address for Unknown Port" + portName);
        }
    }

    /**
     * Set the endpoint address for the specified port name.
     */
    public void setEndpointAddress(javax.xml.namespace.QName portName,
                                   java.lang.String address) throws javax.xml.
            rpc.ServiceException {
        setEndpointAddress(portName.getLocalPart(), address);
    }

}
